<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>头部样式</title>
    <style>
      #head {
        background-image: url(./img/导航背景图.jpg);
        display: flex;
        justify-content: space-around;
        background-color: pink;
        width: 100%;
        height: 100vh;
      }
      #head #head-img {
        position: relative;
        width: 200px;
        height: 100%;
      }

      #head #head-img a img {
        position: absolute;
        width: 80%;
        height: 80%;
        margin: auto;
        top: 10%;
        left: 10%;
      }

      #head #head-daohang {
        position: relative;
        width: 700px;
        height: 100%;
      }

      .navbar {
        position: absolute;
        width: 100%;
        height: 80%;
        top: 10%;
      }

      .navbar ul {
        display: inline-block;
        height: 100%;
        width: 100%;
        list-style-type: none; /* 删除list-style默认样式 */
        margin: 0;
        padding: 0;
        overflow: hidden;
      }

      .navbar li {
        display: inline-block;
        width: 18%;
        height: 100%;
      }

      .navbar li a {
        font-size: 16px;
        display: block;
        height: 80%;
        color: black;
        text-align: center;
        padding: 14px 16px;
        text-decoration: none;
        line-height: 70px;
      }

      .navbar li a:hover {
        border-radius: 12px 12px 0 0;
        color: rgb(162, 152, 52);
        background-color: rgba(255, 255, 255, 0.5);
        -webkit-transition: all 0.3s ease-out; /* Safari 等浏览器 */
        transition: all 0.3s ease-out;
      }
    </style>
  </head>
  <body>
    <div id="head">
      <div id="head-img">
        <a href="#"><img src="./img/朱紫图标.png" alt="" srcset="" /></a>
      </div>
      <div id="head-daohang">
        <div class="navbar">
          <ul>
            <li><a href="#">故事</a></li>
            <li><a href="#">玩法</a></li>
            <li><a href="#">资讯</a></li>
            <li><a href="#">宝可梦</a></li>
            <li><a href="#">商品与特典</a></li>
          </ul>
        </div>
      </div>
    </div>
  </body>
</html>
